import * as globalTypes from '../../../../mutation-types'
import callCenterConfig from '../../../../api/config/callCenter/nodeManage'
// hongwen     start ==================
// 查询播放语音节点
export const queryAnnouncement = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryAnnouncement(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateAnnouncement = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateAnnouncement(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteAnnouncement = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteAnnouncement(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const queryTextAnnouncement = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryTextAnnouncement(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateTextAnnouncement = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateTextAnnouncement(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteTextAnnouncement = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteTextAnnouncement(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 查询按键菜单节点
export const queryIvr = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryIvr(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateIvr = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateIvr(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateIvrKey = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateIvrKey(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteIvr = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteIvr(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 采集输入节点
export const queryValidation = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryValidation(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateValidation = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateValidation(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteValidation = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteValidation(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 查询赋值节点
export const queryAssignment = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryAssignment(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateAssignment = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateAssignment(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteAssignment = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteAssignment(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 查询MD5 加密
export const queryEncryptMd5 = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryEncryptMd5(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateEncryptMd5 = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateEncryptMd5(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteEncryptMd5 = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteEncryptMd5(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 查询CallUrl
export const queryCallUrl = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryCallUrl(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateCallUrl = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateCallUrl(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteCallUrl = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteCallUrl(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 查询route
export const queryRoute = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryRoute(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateRoute = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateRoute(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteRoute = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteRoute(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// 查询时间节点
export const queryDate = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryDate(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateDate = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateDate(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const deleteDate = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteDate(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// hongwen     end ==================
// guoliang   start   ================
/**
* 请求ivr菜单节点列表
* [queryIvrMenu description]
* @param data {Account, PBX}
*/
export const queryIvrMenu = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryIvrMenu(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 修改ivr菜单节点
 * [updateIvrMenu description]
 * @param data {}
 * data.id            节点id
 * data.DisplayName   节点名称
 * data.menuType      节点类型
 * data.NextPeerType  转向类型
 * data.NextPeer      转向标志
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateIvrMenu = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateIvrMenu(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除ivr菜单节点
 * [deleteIvrMenu description]
 * @param data {}
 * data.id            节点id
 * data.DisplayName   节点名称
 * data.menuType      节点类型
 * data.NextPeerType  转向类型
 * data.NextPeer      转向标志
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteIvrMenu = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteIvrMenu(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求双向回呼节点列表
* [queryIvrMenu description]
* @param data {Account, PBX}
*/
export const queryTwoWayCall = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryTwoWayCall(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改双向回呼节点
 * [updateTwoWayCall description]
 * @param data {}
 * data.id            节点id
 * data.DisplayName   节点名称
 * data.Filename      语音文件名
 * data.Variable      变量
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateTwoWayCall = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateTwoWayCall(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除双向回呼节点
 * [deleteTwoWayCall description]
 * @param data {}
 * data.id            节点id
 * data.DisplayName   节点名称
 * data.Filename      语音文件名
 * data.Variable      变量
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteTwoWayCall = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteTwoWayCall(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求自定义节点列表
* [queryExtensionPeer description]
* @param data {Account, PBX}
*/
export const queryExtensionPeer = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryExtensionPeer(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改自定义节点
 * [updateExtensionPeer description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.DialPlan      上下文内容
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateExtensionPeer = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateExtensionPeer(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除自定义节点
 * [deleteExtensionPeer description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.DialPlan      上下文内容
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteExtensionPeer = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteExtensionPeer(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求会议室节点列表
* [queryRoom description]
* @param data {Account, PBX}
*/
export const queryRoom = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryRoom(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改会议室节点
 * [updateRoom description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.RoomPassword  上下文内容
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateRoom = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateRoom(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除会议室节点
 * [deleteRoom description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.RoomPassword  上下文内容
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteRoom = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteRoom(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求语音留言节点
* [queryVoiceMail description]
* @param data {Account, PBX}
*/
export const queryVoiceMail = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryVoiceMail(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改语音留言节点
 * [updateVoiceMail description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.Filename      提示语音
 * data.ToPeerType    转向类型
 * data.ToPeer        转向标志
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateVoiceMail = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateVoiceMail(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除语音留言节点
 * [deleteVoiceMail description]
 * @param data {}
 * data.DisplayName   节点名称
 * data.Filename      提示语音
 * data.ToPeerType    转向类型
 * data.ToPeer        转向标志
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteVoiceMail = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteVoiceMail(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求语音识别节点
* [queryAsr description]
* @param data {Account, PBX}
*/
export const queryAsr = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryAsr(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改语音留言节点
 * [updateAsr description]
 * @param data {}
 * data.id             当前对象id
 * data.DisplayName    节点名称
 * data.Type           播报的文本
 * data.PreVoice       录音前提示音
 * data.StopSignal     终止语音识别按键
 * data.SilenceTime    沉默时间
 * data.Variable       返回结果赋值变量
 * data.EndRobotKey    终止机器人问答关键字
 * data.IsRobotHandle  是否交给机器人处理
 * data.NextPeerType   识别后转向类型
 * data.NextPeer       识别后转向值
 * data.Vocab_id       热词
 * data.Exten          节点ID
 * data.Account        账户号
 * data.PBX            账户pbx
 */
export const updateAsr = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateAsr(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除语音留言节点
 * [deleteAsr description]
 * @param data {}
 * data.id             当前对象id
 * data.DisplayName    节点名称
 * data.Type           播报的文本
 * data.PreVoice       录音前提示音
 * data.StopSignal     终止语音识别按键
 * data.SilenceTime    沉默时间
 * data.Variable       返回结果赋值变量
 * data.EndRobotKey    终止机器人问答关键字
 * data.IsRobotHandle  是否交给机器人处理
 * data.NextPeerType   识别后转向类型
 * data.NextPeer       识别后转向值
 * data.Vocab_id       热词
 * data.Exten          节点ID
 * data.Account        账户号
 * data.PBX            账户pbx
 */
export const deleteAsr = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteAsr(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 获取热词数据
* [queryHotCode description]
* @param data
* data.idle String 值 ''
*/
export const queryHotCode = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryHotCode(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 获取标签下热词数据
* [queryRCByTitle description]
* @param data
* data.id String    标签id
* data.page String  当前页
* data.limit String 当前页个数
*/
export const queryRCByTitle = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryRCByTitle(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 点击修改获取当前列热词数据
* [queryRCById description]
* @param data
* data.id String    热词id
*/
export const queryRCById = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.queryRCById(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 添加热词数据
* [addRC description]
* @param data
* data.content String    热词内容
* data.tags Array        标签对象集合 {id: '', name: 标签名称}
*/
export const addRC = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.addRC(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 修改热词数据
* [updateRC description]
* @param data
* data.id String        标签id
* data.label String     值 ''
* data.content String   热词内容
* data.tags Array       标签对象集合 {id: '', name: 标签名称}
*/
export const updateRC = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateRC(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 删除热词数据
* [deleteRc description]
* @param data
* data.id String    热词id
*/
export const deleteRc = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteRc(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求自定义满意度节点列表
* [querySatisfaction description]
* @param data {Account, PBX}
*/
export const querySatisfaction = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.querySatisfaction(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改自定义满意度节点
 * [updateSatisfaction description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.Exten         节点ID
 * data.Welfilename   欢迎词语音文件
 * data.Invalidfilename   无效输入语音文件
 * data.Timeoutfilename   输入超时语音文件
 * data.Byefilename   错误结束语音文件
 * data.Endfilename   评价结束语音文件
 * data.Data   验证变量名
 * data.NextPeerType  转向类型
 * data.NextPeer      转向标志
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateSatisfaction = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateSatisfaction(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除自定义满意度节点
 * [deleteSatisfaction description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.Exten         节点ID
 * data.Welfilename   欢迎词语音文件
 * data.Invalidfilename   无效输入语音文件
 * data.Timeoutfilename   输入超时语音文件
 * data.Byefilename   错误结束语音文件
 * data.Endfilename   评价结束语音文件
 * data.Data   验证变量名
 * data.NextPeerType  转向类型
 * data.NextPeer      转向标志
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteSatisfaction = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteSatisfaction(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
* 请求采集工号并拨打节点列表
* [querySuperDialJobNum description]
* @param data {Account, PBX}
*/
export const querySuperDialJobNum = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.querySuperDialJobNum(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 添加修改采集工号并拨打节点
 * [updateSuperDialJobNum description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.Filename      语音文件
 * data.ToPeerTypeWhenFrontOffice     按0前台转向type
 * data.ToPeerWhenFrontOffice         按0前台转向值
 * data.ToPeerTypeWhenEmpnoNotExist   工号不存在转向type
 * data.ToPeerWhenEmpnoNotExist       工号不存在转向值
 * data.ToPeerTypeWhenEmpnoAgentBusy  座席忙转向type
 * data.ToPeerWhenEmpnoAgentBusy      座席忙转向值
 * data.ToPeerTypeWhenEmpnoLogoff     网关未注册也未绑定手机转向type
 * data.ToPeerWhenEmpnoLogoff         网关未注册也未绑定手机转向值
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateSuperDialJobNum = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateSuperDialJobNum(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 删除采集工号并拨打节点
 * [deleteSuperDialJobNum description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.Filename      语音文件
 * data.ToPeerTypeWhenFrontOffice     按0前台转向type
 * data.ToPeerWhenFrontOffice         按0前台转向值
 * data.ToPeerTypeWhenEmpnoNotExist   工号不存在转向type
 * data.ToPeerWhenEmpnoNotExist       工号不存在转向值
 * data.ToPeerTypeWhenEmpnoAgentBusy  座席忙转向type
 * data.ToPeerWhenEmpnoAgentBusy      座席忙转向值
 * data.ToPeerTypeWhenEmpnoLogoff     网关未注册也未绑定手机转向type
 * data.ToPeerWhenEmpnoLogoff         网关未注册也未绑定手机转向值
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const deleteSuperDialJobNum = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.deleteSuperDialJobNum(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
/**
 * 修改系统节点
 * [updateSystem description]
 * @param data {}
 * data.id            当前对象id
 * data.DisplayName   节点名称
 * data.ToPeerTypeWhenEmpnoNotExist   工号不存在转向type
 * data.ToPeerWhenEmpnoNotExist       工号不存在转向值
 * data.ToPeerTypeWhenEmpnoAgentBusy  座席忙转向type
 * data.ToPeerWhenEmpnoAgentBusy      座席忙转向值
 * data.ToPeerTypeWhenEmpnoLogoff     座席未登陆转向类型
 * data.ToPeerWhenEmpnoLogoff         座席未登陆转向值
 * data.AgentBusy                     禁止坐席置忙时进线
 * data.Exten         节点ID
 * data.Account       账户号
 * data.PBX           账户pbx
 */
export const updateSystem = ({commit, state, rootState, dispatch}, data) => {
  return callCenterConfig.updateSystem(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
// guoliang   end   ================
